package tracksystem;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Embedded;

import com.googlecode.objectify.annotation.Subclass;

import controlsystem.Course;

/**
 * Een school activiteit
 * 
 * @author Incalza Dario
 * 
 */
@Subclass
public class SchoolActivity extends Activity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Embedded
	private Course course;

	private int pages;

	@SuppressWarnings("unused")
	private SchoolActivity() {
	} // nodig voor objectify

	/**
	 * Maakt een nieuw School activiteit aan.
	 * 
	 * @param duration
	 * @param place
	 * @param description
	 * @param rating
	 * @param type
	 * @param comment
	 * @param course
	 * @param pages
	 */
	public SchoolActivity(Date startDate, Date stopDate, String place,
			String description, int rating, String type, String comment,
			Course course, int pages) {
		super(startDate, stopDate, place, description, rating, type, comment);
		this.course = course;
		this.pages = pages;
	}

	public SchoolActivity(Date startDate) {
		super(startDate);
	}
	
	public SchoolActivity(Date startDate, Course course)
	{
		super(startDate);
		this.course = course;
	}

	/**
	 * Haal het bijhorende course-object op.
	 * 
	 * @return het bijhorende Course-object
	 */
	public Course getCourse() {
		

		return course;
	}

	/**
	 * Vraag het aantal pagina's die zijn gestudeerd op.
	 * 
	 * @return aantal pagina's
	 */
	public int getPages() {
		return pages;
	}

	/**
	 * @param pages
	 *            the pages to set
	 */
	public void setPages(int pages) {
		this.pages = pages;
	}

	public void setCourse(Course course) {
		
		this.course = course;
	}
	
	
}
